﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace CoreEx.DynamicInvoker
{
    /// <summary>
    /// Represents a class that is capable of finding type members based on the name
    /// and the arguments that used to invoke the member.
    /// </summary>
    public interface IMemberFinder
    {
        /// <summary>
        /// Returns the <see cref="MemberInfo"/> that matches <paramref name="memberName"/> and the list of <paramref name="arguments"/>.
        /// </summary>
        /// <param name="type">The <see cref="Type"/> on witch to search for members.</param>
        /// <param name="memberName">The name of the member to find.</param>
        /// <param name="arguments">An array of arguments that matched against the members parameter list.</param>
        /// <returns>A <see cref="MemberInfo"/> representing the matching member, otherwise <b>NULL</b>.</returns>
        MemberInfo GetMember(Type type,string memberName, object[] arguments);
    }
}
